<?php
include_once 'BaseDAO.php';
//include_once '../util/plog/classes/plog.php';

class CompanyMemberDAO extends BaseDAO {
	
	public function __construct() {
		parent::__construct ();
//		$this->log = Plog::factory ( __FILE__ );
	}
	
	public function queryAll() {
		$sql = "select * from company_member where 0=0 ";
		//		echo  $sql;
		$result = @mysql_query ( $sql );
		return $this->toArray ( $result );
	}
	
	public function queryById($cm_id) {
		$sql = "select * from company_member where 0=0 and cm_id=$cm_id";
		//echo  $sql;
		$result = @mysql_query ( $sql );
		return $this->toArray ( $result );
	}
	
	public function queryCompanyMember($c_name, $c_pass){
		$sql = "select * from company_member where 0=0 and c_name='$c_name' and c_pass='$c_pass'";
		//echo  $sql;
		$result = @mysql_query ( $sql );
		return $this->toArray ( $result );
	}

}
?>